package fields;

import game.*;

public class LaborCamp extends Ownable {

	private int baseRent;
	
	public LaborCamp(int number, String name, int price) {
		
		super(number, name, price);
		fieldValue=2;
	}
	
	public void landOnField(Player sp)
	{
		if (!isNotOwned() && sp!=owner)
		{ 
		setRent(sp.getChoice());
		sp.transfer(getRent(), owner);
		}
		else {
			if (sp.getChoice()==1) buy(sp);
		}
	}
	
	public void setRent(int dice)
	
	{
		baseRent = (dice*100)*owner.getLaborCamps();
	}
	
	public int getRent()
	{
		return baseRent;		//SKAL RETTES!
	}	
	
	public void buy(Player s)
	{
		super.buy(s);
		s.addLaborCamp(this);
	}
}